<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap {


    protected function _initSession() {

        Zend_Session::start();
    }

    protected function _initAutoLoad() {
        require_once 'Zend/Loader/Autoloader.php';

        $loader = Zend_Loader_Autoloader::getInstance();
        $loader->registerNamespace(array('Objects_', 'Services_', 'Default_'));
    }

    protected function _initDatabase() {

        $configDataBase = new Zend_Config_Ini(ROOT_APPLICATION_CONFIGURATION.DS.'application.ini', 'database');
        $options = $configDataBase->db->params->toArray();

        Zend_Registry::set('DataBase_Options', $options);
        $db = new Zend_Db_Adapter_Pdo_Mysql($options);

        $db->setFetchMode(Zend_Db::FETCH_OBJ);
        Zend_Db_Table::setDefaultAdapter($db);
        Zend_Registry::set('Zend_Db', $db);
    }
   
}

